<template>
  <div class="home">
    <el-breadcrumb separator-class="el-icon-arrow-right">
      <el-breadcrumb-item :to="{ path: '/' }">项目</el-breadcrumb-item>
      <el-breadcrumb-item>项目列表</el-breadcrumb-item>
    </el-breadcrumb>
    <div>
      <el-tabs type="border-card">
        <el-tab-pane>
          <span slot="label"><i class="el-icon-s-order"></i>基本信息</span>
          <info></info>
        </el-tab-pane>
        <el-tab-pane>
          <span slot="label"><i class="el-icon-s-platform"></i>甘特图</span>
          <gantt :taskData="taskData"></gantt>
        </el-tab-pane>
        <el-tab-pane>
          <span slot="label"><i class="el-icon-folder"></i>项目文档</span>
          <doc></doc>
        </el-tab-pane>
        <!-- <el-tab-pane>
          <span slot="label"><i class="el-icon-date"></i>任务列表</span>
          <task :data="data"></task>
        </el-tab-pane> -->
        <el-tab-pane>
          <span slot="label"><i class="el-icon-s-ticket"></i>项目服务</span>
          <server></server>
        </el-tab-pane>
        <el-tab-pane
          ><span slot="label"
            ><i class="el-icon-s-marketing"></i>项目数据
          </span>
          <data-views></data-views>
        </el-tab-pane>
        <el-tab-pane>
          <span slot="label"><i class="el-icon-setting"></i>项目设置</span>
          <setting></setting>
        </el-tab-pane>
      </el-tabs>
    </div>
  </div>
</template>

<script>
import { data } from "./data";
import gantt from "./components/gantt2";
import info from "./components/info.vue";
// import task from "./components/task.vue";
import server from "./components/server.vue";
import DataViews from "@/views/project/components/DataViews";
import doc from "@/views/project/components/doc";
import setting from "@/views/project/components/setting";
import Setting from "./components/setting.vue";
import axios from "axios";

export default {
  name: "Home",
  components: {
    gantt,
    info,
    // task,
    server,
    DataViews,
    doc,
    setting,
    Setting,
  },
  data() {
    return {
      data: data,
      taskData: {},
    };
  },
  mounted() {
    this.GetList();
  },
  methods: {
    GetList() {
      axios.get("http://localhost:5000/data4").then((res) => {
        console.log(res);
        this.taskData = res.data.data;
        console.log(this.taskData);
      });
    },
  },
};
</script>
